package net.bucephalus.hoplite.jms.impl;

import javax.jms.Destination;

import net.bucephalus.hoplite.jms.BaseMessageSender;

import org.springframework.jms.core.JmsTemplate;

/**
 * An implementation of {@link BaseMessageSender} based on Spring's {@link JmsTemplate}.
 * 
 * @author petar.mitrovic
 */
public class BaseMessageSenderImpl implements BaseMessageSender {

	private JmsTemplate jmsTemplate;
	
	private Destination destination;
	
	protected void convertAndSend(Object message) {
		getJmsTemplate().convertAndSend(message);
	}

	public JmsTemplate getJmsTemplate() {
		return jmsTemplate;
	}

	public void setJmsTemplate(JmsTemplate jmsTemplate) {
		this.jmsTemplate = jmsTemplate;
	}

	public Destination getDestination() {
		return destination;
	}

	public void setDestination(Destination destination) {
		this.destination = destination;
	}
}
